# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-editdistance-s
_pyname=editdistance-s
pkgver=1.0.0
pkgrel=4
pkgdesc="Fast implementation of the edit distance"
url="https://github.com/asottile-archive/editdistance-s"
arch="all"
license="MIT"
depends="python3 py3-cffi"
makedepends="py3-setuptools python3-dev"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/asottile-archive/editdistance-s/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo "$PWD"/build/lib.*)" pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
148234a38f54f70a2d6bc64f6a166a8954c79fb89d5f5c0bf3f041fe60056332901484a0626e218a72ae992f476305cbb662dfa0acdda794727fc682c569d718  editdistance-s-1.0.0.tar.gz
"
